﻿using SqlSugar;

namespace Zy.Shared.Repository.ClickHouse
{
    public interface ISqlSugarEntity
    {
        long Id { get; set; }
    }
    public class SqlSugarEntity : ISqlSugarEntity
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = false,ColumnDescription ="ID",ColumnName ="id")]
        public long Id { get; set; }
    }
    /// <summary>
    /// 完全符合审计的实体
    /// </summary>
    public class SqlSugarAuditFullEntity : SqlSugarAuditEntity, IAuditFullEntity
    {
      /// <summary>
      /// 修改人
      /// </summary>
        [SugarColumn( ColumnDescription = "修改人", ColumnName = "modify_by", IsNullable = true)]
        public long? ModifyBy { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        [SugarColumn(ColumnDescription = "修改时间", ColumnName = "modify_time", IsNullable = true)]
        public DateTime? ModifyTime { get; set; }
    }
    /// <summary>
    /// 符合审计的实体
    /// </summary>
    public class SqlSugarAuditEntity : SqlSugarEntity, IAuditEntity
    {
        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnDescription = "创建时间", ColumnName = "create_time")]
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        [SugarColumn(ColumnDescription = "创建人", ColumnName = "create_by", IsNullable = true)]
        public long? CreateBy { get; set; }
    }
}
